<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/base}">
<head>
    <title>错误 - 暖心助农选品平台</title>
</head>
<body>
    <div layout:fragment="content">
        <div class="container mt-5">
            <div class="row justify-content-center">
                <div class="col-md-8">
                    <div class="card">
                        <div class="card-header bg-danger text-white">
                            <h4 class="mb-0">发生错误</h4>
                        </div>
                        <div class="card-body">
                            <div class="alert alert-danger">
                                <h5>错误信息：</h5>
                                <p th:text="${message}">错误信息</p>
                            </div>
                            
                            <div class="mt-3">
                                <h5>请求 URL：</h5>
                                <p th:text="${url}">URL</p>
                            </div>
                            
                            <div class="mt-3" th:if="${exception != null}">
                                <h5>异常详情：</h5>
                                <pre th:text="${exception.toString()}">异常堆栈</pre>
                            </div>
                            
                            <div class="mt-4">
                                <a th:href="@{/}" class="btn btn-primary">返回首页</a>
                                <button onclick="history.back()" class="btn btn-secondary ms-2">返回上一页</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html> 